﻿namespace AllInOnePluginBL.Rules
{
    /// <summary>
    /// Summary description for IsHebSubMovieRule
    /// </summary>
    public class IsHebSubMovieRule : IRule
    {
        public void ApplyRule(PluginDB.PluginVideoInfo pluginVideoInfo)
        {
            if (pluginVideoInfo.IsHebSub) return;
            pluginVideoInfo.IsHebSub = IsHebSub(pluginVideoInfo.HebrewVideoName);
        }

        public bool IsHebSub(string videoName)
        {
            return (videoName.Contains("תרגום מובנה") || 
                    videoName.Contains("מתורגם") ||
                    videoName.Contains("תרגם מובנה"));
        }
    }
}